<script type="text/javascript">
    $(function () {
        $("span.ljtip").ljDetail($("#xy_detail_ljtip").val(), {
            position: 'top'
        });
        $("#xygl_detail_table .previewImg").lightbox({
            fitToScreen: true,
            loopImages: true,
            imageClickClose: false,
            disableNavbarLinks: true
        });
    })
</script>
<div id="xygl_detail" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
    <div title="协议信息" style="padding:10px">
    <#if xy??>
        <#if xy.xyzt=='已保存'>
            <div style="float: right;">
                <input type="button" class="up-bton" onclick="xy_commitItem()" value=""/>
            </div>
        </#if>
    </#if>
        <table id="xygl_detail_table" style="width: 100%" class="tb tab-t t-bor">
            <input name="xy.id" type="hidden" value="${(xy.id)!''}"/>
            <input id="xy_detail_type" type="hidden" value="${(type)!''}"/>
            <col width="90px"/>
            <col width=""/>
            <col width="90px"/>
            <col width=""/>
            <col width="90px"/>
            <col width=""/>
            <tr>
                <th style="font-size: 14px;font-weight:bolder">协议号：</th>
                <td colspan="3" style="font-size: 14px;font-weight:bolder">
                ${(xy.xyhm)!}
                </td>
                <th style="font-size: 14px;font-weight:bolder">协议类型：</th>
                <td style="font-size: 14px;font-weight:bolder">
                <#if type==1>采购协议<#elseif type==2>销售协议<#else>三方协议</#if>
                </td>
            </tr>
            <tr>
                <th style="font-size: 14px;font-weight:bolder">路&nbsp;&nbsp;&nbsp;径：</th>
                <td colspan="5" style="font-size: 14px;font-weight:bolder">
                    <span class="ljtip">${(xy.lj.mc)!}</span>
                </td>
                <input id="xy_detail_ljtip" value="${(xy.lj.id)!}" type="hidden"/>
            </tr>
        <#if type==3>
            <tr>

                <th> 三方类型：</th>
                <td> ${(xy.rzlx.mc)!} </td>
            </tr>
        </#if>
            <tr>
                <th>所属公司：</th>
                <td>${(xy.nbgs.jc)!}</td>
                <th>开始时间：</th>
                <td>${(xy.kssj?date)!}</td>
                <th>结束时间：</th>
                <td>${(xy.jssj?date)!}</td>
            </tr>
            <tr>
            <#if type==1>
                <th>供&nbsp;应&nbsp;&nbsp;商：</th>
                <td>${(cgxy.gys.qc)!}</td>
            <#elseif type==3>
                <th>供&nbsp;应&nbsp;&nbsp;商：</th>
                <td>${(sfxy.gys.qc)!}</td>
            </#if>
                <th>付款方式：</th>
                <td>${(xy.fkfs.z)!}</td>
                <th>交货方式：</th>
                <td>${(xy.jhfs)!}</td>
            </tr>
        <#if type==2||type==3>
            <tr>
                <#if type==2>
                    <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
                    <td>${(xsxy.kh.qc)!}</td>
                    <th>计算依据：</th>
                    <td>${(xsxy.hkjsfs.z)!}</td>
                    <th>回款期限：</th>
                    <td>${(xsxy.hkqx)!}</td>
                <#else>
                    <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
                    <td>${(sfxy.kh.qc)!}</td>
                    <th>回款计划：</th>
                    <td>${(sfxy.hkjsfs.z)!}</td>
                    <th>回款期限：</th>
                    <td>${(sfxy.hkqx)!}</td>
                </#if>
            </tr>
        </#if>
        <#if type==1>
            <tr>
                <th>统筹方式：</th>
                <td>
                ${(xy.jyms.tcfs.z)!''}
                </td>
                <th>统筹公司：</th>
                <td>
                ${(xy.jyms.tcgs.jc)!''}
                </td>
                <th>统筹部门：</th>
                <td>
                ${(xy.jyms.tcbm.jc)!''}
                </td>
            </tr>
        </#if>
            <tr>
                <th>经营品种：</th>
                <td>${(xy.zycp)!}</td>
                <td colspan="4" style="padding: 0;">
                    <table style="width:100%;" class="tb tab-t t-small">
                        <col width="89px"/>
                        <col width=""/>
                        <col width="94px"/>
                        <col width=""/>
                        <col width="92px"/>
                        <col width=""/>
                        <tr>
                            <th>年协议量：</th>
                            <td>${(xy.nxyl?string(",##0.0000"))!}</td>
                            <th>月协议量：</th>
                            <td>${(xy.yxyl?string(",##0.0000"))!}</td>
                            <th>单位：</th>
                            <td style="border-right:none;">${(xy.yxldw)!}</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <th>担&nbsp;保&nbsp;&nbsp;方：</th>
                <td>${(xy.dbf.qc)!}</td>
                <th>担保方式：</th>
                <td>${(xy.dbfs)!}</td>
                <th>担保额(万元)：</th>
                <td>${(xy.dbe?string(",##0.00"))!}</td>
            </tr>
            <tr>
                <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                <td colspan="5">${(xy.bz)!}</td>
            </tr>
            <tr>
                <th>附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件：</th>
                <td class="lian" colspan="5">
                <#if xy.fjList??>
                    <#list xy.fjList as fj>
                        <span class="uploadify-queue-item fileName" style="height:65px;text-align: center;">
                            <a href="${base}/base/fj/downLoadFj?fjId=${fj.id}" class="previewImg"
                               rel="previewImg_${(xy.id)!}" title="${(fj.ccmc)!}"
                               style="display:block;margin: 0 auto;">
                                <img src="${base}/base/fj/downLoadFj?fjId=${fj.id}" width="50" height="50"/>
                            </a>
                        <a href="javascript:void(0);"
                           onclick="window.location.href='${base}/base/fj/downLoadFj?fjId=${fj.id}'">下载
                        </a>
                        </span>
                    </#list>
                </#if>
                </td>
            </tr>
            <tr>
                <th>制&nbsp;单&nbsp;&nbsp;人：</th>
                <td>${(xy.createUser.xm)!}</td>
                <th>制单时间：</th>
                <td colspan="3">${(xy.dateCreated)!?datetime}</td>
            </tr>
        </table>
        <input type="hidden" id="xy_id" value="${xy.id}"/>
    </div>
</div>
